-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support timestamp skipping in test cases #569
Conversation
This PR is ready, but I just saw #657 |
@r3v4s I don't think we need to close it - can we make it use |
@thehowl I wasn't thinking straight. Even if we get rid of So maybe we can leave this pr bit longer. BTW, Can you please specify what you're referring to as "it" in "can we make it"? |
The PR. I was just saying you could modify the code to use |
12a5441
to
f99dfa5
Compare
To give you some context on |
NEW IDEA Since #969 is merged, now gno will create block every 5 seconds. Lines 643 to 656 in 5d3be42
something like this maybe??
|
I don't think block time every 5s is something set in stone, and I think having Furthermore I think TestSetTimestamp (#924) might be a better feature. |
I'll still implement automation, but we can wait for #924 |
f99dfa5
to
bd13760
Compare
❌ Deploy Preview for gno-docs failed.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but please add a unit test to prevent regressions.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #569 +/- ##
==========================================
+ Coverage 48.44% 58.13% +9.69%
==========================================
Files 409 389 -20
Lines 61965 65275 +3310
==========================================
+ Hits 30019 37950 +7931
+ Misses 29446 24503 -4943
- Partials 2500 2822 +322
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
64bf7a2
to
d7af82e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @r3v4s - I see this is a long standing PR with some discussions going on on how we should do this.
To get a v1 on this - let's just simplify it and just add count
to ctx.Timestamp
. Then, please add a txtar test for this, and we can merge it. We should at least have something, and then iterate, rather than be stuck on a discussion.
Also, please check why examples/test
is failing in the CI 🙏
In this case, skipping 1 block will increase time 1 second. Did I understood correctly?
I don't think I can. AFAIK // UPDATE: |
Pinging @moul for a second review 🙏 |
Description
support timestamp skipping in test cases
How has this been tested?
test case run by gnodev